#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
    char ch;
    while (scanf("%c", &ch) == 1)
    {
        
        if (ch > 'a' && ch < 'z')
        {
            ch = ch - 32;
            printf("%c\n", ch);
            getchar();
        }
        else if (ch > 'A' && ch < 'Z')
        {
            ch = ch + 32;
            printf("%c\n", ch);
            getchar();
        }

      
    }


    return 0;
}